export function deepCopy(target: any) {
  if (typeof target == "object") {
    const result: any = Array.isArray(target) ? [] : {};
    for (const key in target) {
      if (typeof target[key] == "object") {
        result[key] = deepCopy(target[key]);
      } else {
        result[key] = target[key];
      }
    }

    return result;
  }

  return target;
}

// export function swap(arr, i, j) {
//   const temp = arr[i];
//   Vue.set(arr, i, arr[j]);
//   Vue.set(arr, j, temp);
// }

export function selector(selector: any) {
  return document.querySelector(selector);
}

// const components = ["VText", "RectShape", "CircleShape"];

// export function isPreventDrop(component) {
//   return !components.includes(component) && !component.startsWith("SVG");
// }
